CC = gcc
CFLAGS = -Wall -O2 -g

COMM_PATH = /mnt/other_c/ffmpegtest/common

LIB_PATH += -L.
LIB_PATH += -L/mnt/other_c/ffmpeg-1.2/ffmpeg1.2/lib/
LIB_PATH += -L/mnt/other_c/SDL/lib


FFMPEG_LIBS =	-lavdevice                        \
                -lavformat                        \
                -lavfilter                        \
                -lavcodec                         \
                -lswresample                      \
                -lswscale                         \
                -lavutil                          \

LDFLAGS = $(LIB_PATH) $(FFMPEG_LIBS) -lSDL -lm -lpthread
#LDFLAGS = $(LIB_PATH) -lSDL -lm -lpthread

INC_PATH = -I/mnt/other_c/ffmpeg-1.2/ffmpeg1.2/include 
#INC_PATH = -I/mnt/other_c/ffmpeg-1.2/
INC_PATH += -I/mnt/other_c/SDL/include/SDL/
INC_PATH += -I.
INC_PATH += -I$(COMM_PATH)


COMM_SRC = $(wildcard $(COMM_PATH)/*.c)  #share file 
COMM_OBJ := $(COMM_SRC:%.c=%.o)

SRC = $(wildcard test1.c decoding_encoding.c)
DST = $(SRC:%.c=%)

all:$(DST)

$(DST):%:%.c $(COMM_SRC)
	$(CC) $(CFLAGS) -o $@ $< $(COMM_SRC) $(LDFLAGS) $(INC_PATH)
	#strip $@
clean:
	rm -f *.o $(DST)
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	